<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('确认收款列表')" />
</head>
<body class="gray-bg">
	 <input type="hidden" name="sqkpId" id="sqkpId" th:value="${sqkpId}" />
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        //var editFlag = [[${@permission.hasPermi('gcgl:qrsk:edit')}]];
        var removeFlag = [[${@permission.hasPermi('gcgl:qrsk:remove')}]];
        var prefix = ctx + "gcgl/qrsk";
        var datas = [[${@dict.getType('gcgl_qrsk_type')}]];

        $(function() {
            var options = {
                url: prefix + "/list/"+$("#sqkpId").val(),
                //updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                modalName: "确认收款",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'gcProjectid',
                    title: '合同ID',
                    visible: false
                },
                {
                    field: 'sqkpId',
                    title: '申请开票ID',
                    visible: false
                },
                {
                    field: 'projectName',
                    title: '项目名称'
                },
                {
                    field: 'htje',
                    title: '合同金额'
                },
                {
                    field: 'type',
                    title: '类型',
		            formatter: function(value, item, index) {
		            	return $.table.selectDictLabel(datas, item.type);
		            }
                },
                {
                    field: 'bcsqkpje',
                    title: '本次申请开票金额'
                },
                {
                    field: 'qrjine',
                    title: '确认收款金额'
                },
                {
                    field: 'skAt',
                    title: '收款时间'
                },
                {
                    field: 'fkdw',
                    title: '付款单位'
                },
                {
                    field: 'fkyh',
                    title: '付款银行'
                },
                {
                    field: 'skdw',
                    title: '收款单位'
                },
                {
                    field: 'skyh',
                    title: '收款银行'
                },
                {
                    field: 'dept',
                    title: '归属公司'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        //actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>